home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / lib / openoffice / program / spadmin < prev    next >
Encoding:
Text File  |  2012-10-08  |  2.4 KB  |  77 lines

  1. #!/bin/sh
  2. #*************************************************************************
  3. #
  4. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  5. #
  6. # Copyright 2000, 2010 Oracle and/or its affiliates.
  7. #
  8. # OpenOffice.org - a multi-platform office productivity suite
  9. #
  10. # This file is part of OpenOffice.org.
  11. #
  12. # OpenOffice.org is free software: you can redistribute it and/or modify
  13. # it under the terms of the GNU Lesser General Public License version 3
  14. # only, as published by the Free Software Foundation.
  15. #
  16. # OpenOffice.org is distributed in the hope that it will be useful,
  17. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. # GNU Lesser General Public License version 3 for more details
  20. # (a copy is included in the LICENSE file that accompanied this code).
  21. #
  22. # You should have received a copy of the GNU Lesser General Public License
  23. # version 3 along with OpenOffice.org.  If not, see
  24. # <http://www.openoffice.org/license.html>
  25. # for a copy of the LGPLv3 License.
  26. #
  27. #*************************************************************************
  28.  
  29. # enable file locking
  30. SAL_ENABLE_FILE_LOCKING=1
  31. export SAL_ENABLE_FILE_LOCKING
  32.  
  33. # resolve installation directory
  34. sd_cwd="`pwd`"
  35. if [ -h "$0" ] ; then
  36.     sd_basename=`basename "$0"`
  37.      sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"` 
  38.     cd "`dirname "$0"`"
  39.     cd "`dirname "$sd_script"`"
  40. else
  41.     cd "`dirname "$0"`"
  42. fi
  43. sd_prog=`pwd`
  44. cd "$sd_cwd"
  45.  
  46. #collect all bootstrap variables specified on the command line
  47. #so that they can be passed as arguments to javaldx later on
  48. for arg in $@
  49. do
  50.   case "$arg" in
  51.        -env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";;
  52.   esac
  53. done
  54.  
  55. # extend the ld_library_path for java: javaldx checks the sofficerc for us
  56. if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
  57.     my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \
  58.         "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
  59.     if [ -n "$my_path" ] ; then
  60.         LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
  61.         export LD_LIBRARY_PATH
  62.     fi
  63. fi
  64.  
  65. unset XENVIRONMENT
  66.  
  67. # uncomment line below to disable anti aliasing of fonts
  68. # SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE
  69.  
  70. # Set PATH so that crash_report is found:
  71. PATH=$sd_prog${PATH+:$PATH}
  72. export PATH
  73.  
  74. # execute binary
  75. exec "$sd_prog/../basis-link/program/spadmin.bin" "$@" \
  76.     "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"
  77.